﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SpreadSheetViewer.Models
{
    public abstract class BaseNode 
    {
        private string text;
        public string Text 
        {
            get => text;
            set => text = value;
        } 
    }
    public class FileNode : BaseNode
    {
        private string location;
        public string Location
        {
            get => location;
            set => location = value;
        }
    }
    public class DirectoryNode : BaseNode
    {
        IList<BaseNode> nodes;
        public IList<BaseNode> Nodes 
        { 
            get 
            {
                if (nodes == null)
                    nodes = new List<BaseNode>();
                return nodes;
            }
            set => nodes = value; 
        }
    }
}